# Intro -------------------------------------------------------------------
# Cleaning the environment
rm(list = ls())

# loading packages
suppressPackageStartupMessages({
  library(tidyverse)
  library(plotly)
  library(htmlwidgets)
})



# Visualization -----------------------------------------------------------
my_plot = plot_ly(iris,
                  x=~Sepal.Length, y=~Sepal.Width, z=~Petal.Length,
                  color = ~Species)

my_plot
## No trace type specified:
##   Based on info supplied, a 'scatter3d' trace seems appropriate.
##   Read more about this trace type -> https://plotly.com/r/reference/#scatter3d
## No scatter3d mode specifed:
##   Setting the mode to markers
##   Read more about this attribute -> https://plotly.com/r/reference/#scatter-mode
# Saving into html --------------------------------------------------------
saveWidget(widget = my_plot,file = 'my_plot_Q5.html')
## No trace type specified:
##   Based on info supplied, a 'scatter3d' trace seems appropriate.
##   Read more about this trace type -> https://plotly.com/r/reference/#scatter3d
## No scatter3d mode specifed:
##   Setting the mode to markers
##   Read more about this attribute -> https://plotly.com/r/reference/#scatter-mode
# End ---------------------------------------------------------------------
devtools::install_github("JohnCoene/aframer")   # select option 3 (none) 
## WARNING: Rtools is required to build R packages, but is not currently installed.
## 
## Please download and install Rtools 4.2 from https://cran.r-project.org/bin/windows/Rtools/ or https://www.r-project.org/nosvn/winutf8/ucrt3/.
## Skipping install of 'aframer' from a github remote, the SHA1 (290e43ba) has not changed since last install.
##   Use `force = TRUE` to force installation
devtools::install_github("JohnCoene/arframer")  # select option 3 (none)
## WARNING: Rtools is required to build R packages, but is not currently installed.
## 
## Please download and install Rtools 4.2 from https://cran.r-project.org/bin/windows/Rtools/ or https://www.r-project.org/nosvn/winutf8/ucrt3/.
## Skipping install of 'arframer' from a github remote, the SHA1 (1b91fa97) has not changed since last install.
##   Use `force = TRUE` to force installation